package com.derbysoft.drc.billcheck

import org.apache.commons.lang.StringUtils

import scala.io.Source
import scala.tools.scalap.scalax.util.StringUtil

/**
  * Created by xinliwang on 2017/6/4.
  */
object ResultAnyles {
  def main(args: Array[String]): Unit = {
    val lines = Source.fromFile("/Users/xinliwang/workspace/billcheck/src/main/resources/result2.txt").getLines().toList
   val total= lines.filter(line => !(line.split("====>")(1) == "0")).map(StringUtils.substringAfter(_,"====>").toInt).sum
    println(total)

    lines.filter(line => !(line.split("====>")(1) == "0")).foreach(println(_))

  }
}
